<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta charset="utf-8" />
		<base href="<%=basePath%>">
		<title>发布文章</title>
		<link rel="stylesheet"
			href="assets/plugins/kindeditor/themes/default/default.css" />
		<link rel="stylesheet"
			href="assets/plugins/kindeditor/plugins/code/prettify.css" />
		<link href="assets/css/style.css" rel="stylesheet"/>
		
		
		<script charset="utf-8" src="assets/plugins/kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="assets/plugins/kindeditor/lang/zh_CN.js"></script>
		
		<script charset="utf-8"
			src="assets/plugins/kindeditor/plugins/code/prettify.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="comment"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});
			});
		</script>
		<style type="text/css">
				body {
                padding-top:60px;
                padding-bottom:40px;
            }
            textarea {
            		width:600px;
            		height:200px;
            		visibility:hidden
            	}
		</style>
	</head>
	<body onload="prettyPrint()">
		<jsp:include page="../Template/home_top.jsp"></jsp:include>
		<div class="container">
			<div class="row">
			<div class="span9">
			<h3><s:property value="article.title" /></h3>
			<p><s:property value="article.content" escapeHtml="false"/></p>
			<p class="label label-info">文章作者:<s:property value="article.member.name" /> 
			 | 发表日期： <s:date name="article.postdate" format="yyyy-MM-dd HH:mm:ss" />
			 | 文章标签：<s:property value="article.tags" /> 
			</p>
			<br/>
			<hr>
				<s:iterator id="ar" value="article.arComments">
    				<div style="border-bottom:1px solid #d84615"><p>评论内容：${ar.comment}</p>
    				<p>---评论者:   ${ar.commenter}</p> </div>
				</s:iterator>
			<br>
		
		<br/>
			发表您的评论
				<form action="article_putComment">
					<textarea name="comment"></textarea>
					您的名字：<input type="text" name="commenter"><br />
					<input type="hidden" name="aid" value="<s:property value="article.id" />">
					你的邮箱：<input type="text" name="email" /><br />
					<input type="submit" value="提交评论" class="btn btn-primary"/>
				</form>
	 	</div>
	 	<div class="span3">
	 			<div class="well">
            		<div class="">
            			<h3>管理入口</h3>
            		</div>
            		<div class="">
            			<a href="member_memberCenter">用户中心</a>
	                    <br>
	                    <a href="admin/member_memberList">管理员中心</a>
            		</div>
            	</div>
	 	</div>
  		</div>
  		</div>
    <jsp:include page="../Template/home_footer.jsp"/>